package com.wyw.hemerocallis.feign;

import com.wyw.hemerocallis.account.BalanceInfo;
import com.wyw.hemerocallis.vo.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 用户账户服务 Feign 接口
 *
 * @author Mr Wu    yewen.wu.china@gmail.com
 * <p>
 * Update History:
 * Author        Time            Content
 */
@FeignClient(
        contextId = "NotSecuredBalanceClient",
        value = "hemerocallis-account-service"
)
public interface NotSecuredBalanceClient {

    @RequestMapping(
            value = "/hemerocallis-account-service/balance/deduct-balance",
            method = RequestMethod.PUT
    )
    CommonResponse<BalanceInfo> deductBalance(@RequestBody BalanceInfo balanceInfo);
}
